﻿<UserControl x:Class="HDFSViewer.View.FileDetailControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             mc:Ignorable="d" 
             d:DesignHeight="480" d:DesignWidth="640">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="1*"/>
        </Grid.RowDefinitions>

        <ToolBar Grid.Row="0">
            <Label Content="Encoding:" VerticalAlignment="Center"/>
            <ComboBox Width="120" SelectedValue="{Binding Path=SelectedEncoding,Mode=TwoWay}">
                <ComboBox.Items>
                    <sys:String>HEX</sys:String>
                    <sys:String>ASCII</sys:String>
                    <sys:String>UTF8</sys:String>
                    <sys:String>Unicode</sys:String>
                    <sys:String>GB2312</sys:String>
                    <sys:String>GBK</sys:String>
                    <sys:String>BigEndianUnicode</sys:String>
                    <sys:String>UTF32</sys:String>
                    <sys:String>UTF7</sys:String>
                </ComboBox.Items>
            </ComboBox>
            <Label Content="Offset:" VerticalAlignment="Center"/>
            <TextBox Width="50" TextAlignment="Right" Text="{Binding Path=Offset}"/>
            <Label Content="Length" VerticalAlignment="Center"/>
            <TextBox Width="50" TextAlignment="Right" Text="{Binding Path=Length}"/>
            <Button ToolTip="Load" Command="{Binding Path=LoadData}">
                <Button.Content>
                    <Image Source="Image/LoadData.png"></Image>
                </Button.Content>
            </Button>
        </ToolBar>
        <TextBox Grid.Row="1" Text="{Binding Path=Content}" IsReadOnly="True" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible"/>
    </Grid>
</UserControl>
